Passed
Push — develop ( f0c08b...9e3bd7 )
by Endre
03:40
created

Presenter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A present 0 7 1
1
import {ILanguageSetup} from '../../../Language/ChangeLanguageSetup';
2
import Translator from '../../../Language/Translator';
3
import {IObserver} from '../../../Observer/Observer';
4
import Model from './Model';
5
6
export default class Presenter {
7
  languageSetupObserver: IObserver<ILanguageSetup>;
8
9
  constructor(languageSetupObserver: IObserver<ILanguageSetup>) {
10 3
    this.languageSetupObserver = languageSetupObserver;
11
  }
12
13
  present(): Model {
14 1
    const model: Model = new Model();
15 1
    const translator: Translator = this.languageSetupObserver.value.translator;
16 1
    model.title = translator.translate('Application.TopBar.Title');
17
18 1
    return model;
19
  }
20
}